﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClassAdd.aspx.cs" Inherits="FisheryPlatform.Web.Admin.ShareCode.ClassAdd" %>

<%@ Register TagName="Style" TagPrefix="Menu" Src="~/Modules/Menu/StyleMenu.ascx" %>
<%@ Register TagName="Left" TagPrefix="Menu" Src="~/Modules/Menu/LeftMenu.ascx" %>
<%@ Register TagName="Header" TagPrefix="Menu" Src="~/Modules/Menu/HeaderMenu.ascx" %>
<%@ Register TagName="Footer" TagPrefix="Menu" Src="~/Modules/Menu/FooterMenu.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <Menu:Style runat="server" ID="menuStyle" Title="类别管理"></Menu:Style>
</head>
<body>
    <div class="wrapper">
        <Menu:Header runat="server" ID="menuHeader" />
        <div class="content">
            <Menu:Left runat="server" ID="menu_Left" />
            <div class="right">
                <div class="top">
                    类别管理>>新增类别</div>
                <div class="bottom">
                    <form id="form1" runat="server">
                    <input type="hidden" id="txt_ClassId" runat="server" value="" />
                    <div class="edit">
                        <dl>
                            <dt>类别名称(中文)：</dt><dd><input type="text" runat="server" id="txt_Name" class="txt_border txt_input1" /></dd>
                            <dt>类别名称(英文)：</dt><dd><input type="text" runat="server" id="txt_NameEN" class="txt_border txt_input1" /></dd>
                            <dt>编码：</dt><dd><input type="text" runat="server" id="txt_Code" class="txt_border txt_input1" /></dd>
                            <dt>&nbsp;</dt><dd><input type="button" id="btnSubmit" value="  保  存  " /></dd>
                        </dl>
                    </div>
                    </form>
                </div>
            </div>
        </div>
        <Menu:Footer runat="server" ID="menuFooter" />
    </div>
</body>
</html>
<script type="text/javascript">
    (function () {
        ElementValidator.className = { error: "error1", def: "tips", focus: "tips", correct: "correct" };
        var formValidator = new ElementValidator();
        formValidator.addText({ id: "txt_Name", focus: "请输入类别名称（中文）", defTips: "类别名称（中文）必填", len: { text: /^.{2,80}$/, errorMsg: "类别名称（中文）由2-80个字符组成" }, tips: { correctMsg: "OK"} });
        $(jDoc("btnSubmit")).bind("click", function () {
            if (formValidator.validate()) {
                jDoc("form1").submit();
            }
        });
    })()
</script>
<% if (ResultNum > 0)
   { %>
<script type="text/javascript">
    (function () {
        switch(<%=ResultNum %>){
            case 1:alert("保存成功"); break;
            case 2:alert("请输入'类别名称（中文）'");jDoc("txt_Name").focus();break;
            case 3:alert("保存失败");break;
            default:break;
        }
    })();
</script>
<%} %>
